import json

json1_dir = '/data/lzy/tile_round2_train_20210204/train_annos.json'
json2_dir = '/data/lzy/tile_round2_train_20210204/train_1to4_annos.json'
# json3_dir = '/data/lzy/tianchi2021/train_1to16_annos.json'
save_path = '/data/lzy/tile_round2_train_20210204/all.json'
with open(json1_dir) as f:
    annos1 = json.load(f)
with open(json2_dir) as f:
    annos2 = json.load(f)
# with open(json3_dir) as f:
#     annos3 = json.load(f)
result = []
for anno in annos1:
    result.append(anno)
for anno in annos2:
    result.append(anno)
# for anno in annos3:
#     result.append(anno)
with open(save_path, 'w') as fp:
    json.dump(result, fp)